#ifndef VIDEO_H
#define VIDEO_H

#include <QGraphicsVideoItem>
#include <QGraphicsView>
#include <QGraphicsRectItem>

//**************************************************************
//
//                    CAM SCANNER - PROJECT
//
// This class give all camera-view functions to the main class.
//
// version 1.0 - 25.06.2012 Adriano:
//    : first version
//
//
//
//
//
//
//
//**************************************************************

class video : public QGraphicsVideoItem
{
    Q_OBJECT
public:
    explicit video(QWidget *parent = 0);

        // paint camera widget
    virtual void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
signals:
    
public slots:
    
};

class videoView : public QGraphicsView
{
    Q_OBJECT
public:
    explicit videoView(QWidget *parent = 0);

        // get the videowidget as graphics item
    QGraphicsVideoItem *getVideoWidget(void);

        // get mouse events (for future use)
    void mouseMoveEvent(QMouseEvent *event);

private:
    QGraphicsScene*     m_scene;          // scene for view
    video*              m_videoWidget;    // video item for camera
    QGraphicsRectItem*  m_rect;           // a sizable rect (for the future - cropping image)
};

#endif // VIDEO_H
